package com.weitu.environmental.basicInfo.service.impl;

import com.weitu.environmental.basicInfo.entity.Ou;
import com.weitu.environmental.basicInfo.mapper.OuMapper;
import com.weitu.environmental.basicInfo.service.OuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-03-31
 */
@Service
public class OuServiceImpl implements OuService {

    private final OuMapper ouMapper;

    @Autowired
    public OuServiceImpl(OuMapper ouMapper) {
        this.ouMapper = ouMapper;
    }

    @Override
    public List<Ou> findByParam(Map paramMap) {
        return ouMapper.findByParam(paramMap);
    }

    @Override
    public Integer findByParamCount(Map paramMap) {
        return ouMapper.findByParamCount(paramMap);
    }

    @Override
    public Ou findById(String id) {
        return ouMapper.findById(id);
    }

    @Override
    public List<Map> findAll() {
        return ouMapper.findAll();
    }

    @Transactional
    @Override
    public Integer add(Map paramMap) {
        return ouMapper.add(paramMap);
    }

    @Transactional
    @Override
    public Integer updateById(Map paramMap) {
        return ouMapper.updateById(paramMap);
    }


}
